-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add "AI Tools" Plugin #8365
base: master
Are you sure you want to change the base?
Add "AI Tools" Plugin #8365
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Sorry - I do not have an OpenAI Key |
Hi @joocyNut this PR includes a small core modification that is required by the "ai-tools" plugin in order to function. That means that for the moment you can only use the plugin with the special prerelease version of the core included in the preview I will update the docs to clarify this point. |
I did have a look and was a bit confused.
I did not know how to close the dialogue. I personally would prefer done - copy - delete I am not happy with the round "send" button. None of our default buttons at the moment are round. |
Is it possible to get an empty version of the PR? |
Hi @pmario I understand your confusion. This isn't the final user interface. For the moment I prefer "view" because this is not a true editor in that it does not support drafts, and thus doesn't allow users to cancel edits.
While consistency is usually our goal, here the goal is to make the button look distinctive. When using OpenAI, clicking that button is a billable event, and so it seems reasonable to signal that with an unusual visual presentation. |
Hi @joocyNut at the moment the best approach is to save the empty custom core from https://tiddlywiki5-git-feat-ai-tools-jermolenes-projects.vercel.app/empty.html and then drag and drop the ai-tools plugin from https://tiddlywiki5-git-feat-ai-tools-jermolenes-projects.vercel.app/index.html |
…nside action-createtiddler in action strings The root cause was that action-createtiddler widget was calling refreshChildren() with no argument. A secondary factor was that importvariables widget was not defensive in handling a missing changedTiddlers parameter
So that we can do image analysis
Is there some wikitext API for this plugin? I'm writing a workflow plugin like Defy or Coze, which is a visual version of langchain https://github.com/tiddly-gittly/workflow (WIP) I care about how to redirect input from your plugin to workflow, and how to stream workflow output to your UI? Some intermediate node on workflow may search the wiki and append it to user prompt. |
The API is not yet documented, but there is a generic function for retrieving the next message in an LLM conversation: Much of the logic is specific to the LLM, and so lives in the LLM server tiddlers:
The plugin doesn't yet support the streaming variant of LLM APIs, but that is something I hope to work on soon. I think the approach would just be that a message would have a new "message-status" field that could hold values for "streaming" and "complete", and in the background streaming messages would periodically be updated with new text appended. But I think you're asking about piping input and output between different components. I think that would be accomplished by passing tiddler titles around, rather in the way that the |
Thank you, I was asking about piping, so I just need to I have other questions:
This plugin may be a foundation of many 3rd party AI plugins, I'm happy for not needing to spend time writing UI and web API requests for chatbot, and can focus on workflow part. |
Yes, I think so. I've added some docs for the conversation format here: 58f96e7
Yes. It currently supports image input to Llamafile and OpenAI, and the schema allows for image responses, but that is not yet implemented.
I've refactored all the procedures and functions to be global here: ea595df
The purpose of introducing the stability badges is so that we can move to allowing the experimental core plugins to be updated on their own schedule, without waiting for a release (as long as there are no associated changes to the core).
I expect a combination of both approaches will be needed, PRs are welcome in any case. Another key improvement to add is streaming responses from the server, albeit I think that that would require some core modifications to be able to access SSE data in wikitext.
Great, that definitely fits with the goal of pooling the resources of those interested in exploring LLMs in TiddlyWiki. |
Some premitives inspired by https://wordware.ai and https://www.colelawrence.com/storyai :
I can provide better UX with WYSIWYG editor, but without underlying widget support, the UX can't be easily achieve, and won't be wikitext-native (may relying on JSON or YAML to describe sequental async chain, instead of directly using wikitext). This might be a good chance to make TW + AI solution popular. (Wordware has raised a total funding of $125K, not much, but I think product like this worth more, because it feels like JupyterNotebook of AI). |
Makes it possible to include other tiddlers in a prompt
Useful to use text/plain for code
Would you consider add "Artifact Claude" or "Canvas ChatGPT" in this natively? WikiText DSL have huge advantage on creating custom data manipulating UI on the fly. |
Yes, I'd very much like to have more LLMs work out of the box. Are you able to work on them? With Gemini and a few other LLMs I've found it very hard to find the actual HTTP API documentation, they usually want people to use a Python library to interact with things. |
Thanks @linonetwo sorry I missed this. I think there are a few different ways we might achieve those features. I welcome your explorations of making the wikitext action language more powerful. |
Another idea, providing BTW I have too many open PR to manage now, I really want then to be close or merged before I create new ones, while this will require @Jermolene to share some time with me, but good side is I will be confident to write new PRs here, thanks. |
This plugin adds integrated LLM conversations to the TiddlyWiki platform.
It currently supports two different server backends:
See the preview build at: https://tiddlywiki5-git-feat-ai-tools-jermolenes-projects.vercel.app
Note that this PR includes a small modification to the core that is required in order for authorisation with OpenAI to work correctly. This means that you cannot use the "ai-tools" plugin with other versions of the TiddlyWiki core, it only works correctly with the version of the core included in the preview